import random

list1 = ['小虎', '张成阳', '黄涛', '方直', '杨浩东', '黄沪生', '查镕贤']
jiang_xiang = [
('一等奖', 1, 'mate70 pro'),
('二等奖', 1, '小米手环'),
('三等奖', 2, '按摩仪'),
('四等奖', 2, '京东购物卡')
]

def chou_jiang(l1):
    for i, num, goods in jiang_xiang:
        print(f"正在抽取{i}".center(50, '-'))
        name_list = random.sample(l1,num)
        # 将中奖名单从原名单中删除
        for n in name_list:
            if n in l1:
                l1.remove(n)
        info = f"恭喜{','.join(name_list)} 中得{i}!!!!"
        yield info



res1 = chou_jiang(list1)
try:
    for i in range(len(jiang_xiang)):
        input(f"开始抽{i+1}等奖....按下回车开始！")
        print(res1.__next__())
    print(res1.__next__())
except:
    print("所有奖项抽取完毕！！")
